<template>
	<view class="content">
		<view class="title">
			{{title}}
		</view>
		<u-parse :content="content" :tagStyle="style"></u-parse>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				id:'',
				content:'', 
				title:'',
				style: { 
					p: 'color: #545454;font-size:32rpx;line-height:44rpx;margin-bottom:20rpx',
					span: 'font-size: 30rpx',
					img:'width:100% !important;height:auto !important;'
				},
			}
		},
		// 分享给个人
		onShareAppMessage() { 
			return {
				// title: uni.getStorageSync("common_info").shareText,
				// imageUrl: uni.getStorageSync("common_info").sharesImage,
				title:'',
				imageUrl:''
			}
		},
		//分享朋友圈
		onShareTimeline() { 
			return {
				// title: uni.getStorageSync("common_info").shareText,
				// imageUrl: uni.getStorageSync("common_info").sharesImage,
				title:'',
				imageUrl:''
			}
		},
		onLoad(option) {
			this.id = option.id
			this.getDetail()
		},
		methods:{
			getDetail(){
				this.$http({
					url:"/umsArticle/queryById",
					method:"get",
					data:{
						id:this.id
					}
				}).then(data=>{
					this.title = data.title
					this.content = data.content
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		padding: 30rpx;
		box-sizing: border-box;
		font-size: 28rpx;
		color: #333;
		.title{
			font-size: 30rpx;
			font-weight: bold;
			margin-bottom: 40rpx;
		}
	}
</style>